<include file="public:header" />

<form action="{:U('contact/edit_prize_percent')}" method="post" name="myform" id="myform" class="lkcmsform">

<table width="100%" cellpadding="2" cellspacing="1" class="form-table">
<tbody>
    <tr>
        <th width="60">{:L('中奖概率')} :</th>
        <td><input type="text" name="title" id="title" class="input-text" value="{$prize_percent}" size="25" maxlength="100" onkeyup="keyup_action3(this)"><br>
        0代表永远无法中奖<br>
        1代表100分之1的概率中奖<br>
        30代表100分之30的概率中奖<br>
        100代表100分之100的概率中奖<br>
        值需要控制在0~100之间<br>
        请不要输入大于100的数字<br>
        </td>
    </tr>
    
    <tr>
        <th width="60">{:L('开放中奖时间')} :</th>
        <td><input type="text" name="prize_open_time" id="prize_open_time" class="input-text" value="{$prize_open_time}" size="25" maxlength="100"><br>
        当中奖概率大于0时有效<br>
        请输入YYYY-mm-dd HH:ii:ss的格式<br>
        </td>
    </tr>
    


</tbody>
</table>


<table width="100%" cellpadding="2" cellspacing="1" class="form-table">
	<tfoot>
	<tr><th>
<input type="submit" name="dosubmit" id="dosubmit" class="button" value="确定">
	</th></tr>
	</tfoot>
</table>
</form>

<script language="javascript" type="text/javascript" src="__ROOT__/scripts/ckeditor/ckeditor.js"></script>
<script language="javascript" type="text/javascript" src="__ROOT__/scripts/ckfinder/ckfinder.js"></script>
<script type="text/javascript">

    function LK_BrowseServer(id, startupPath ) {
        var finder = new CKFinder();
        finder.BasePath = '__ROOT__/scripts/ckfinder/';
        finder.startupPath  = "Images:/" +  startupPath;
        finder.selectActionFunction = LK_SetFileField;
        finder.selectActionData = new Array(id, startupPath);
        finder.popup();
    }


    function LK_BrowseServer_Files(id, startupPath ) {
        var finder = new CKFinder();
        finder.BasePath = '__ROOT__/scripts/ckfinder/';
        finder.startupPath  = "Files:/" +  startupPath;
        finder.selectActionFunction = LK_SetFileField;
        finder.selectActionData = new Array(id, startupPath);
        finder.popup();
    }


    function LK_SetFileField(fileUrl, data) {
        var id = data["selectActionData"][0];
        jQuery("#" + id).val(fileUrl);
        jQuery("#" + id + "Preview").html("<img src='" + fileUrl + "' />");
    }


    $(function(){
        $(document).ready(function(){
            if (typeof CKEDITOR == "undefined") {
                //document.write("加载CKEditor失败");
            }
            else {
                var editor = CKEDITOR.replace("content");
                CKFinder.setupCKEditor(editor, "__ROOT__/scripts/ckfinder/"); //ckfinder总目录的相对路径.
            }
        });
    });


    $(function(){
        var message_000 = "{:L('不能为空')}";
        $.formValidator.initConfig($.extend(true, {}, JPLUGIN_FORMVALIDATOR_CONFIG, {formID: 'myform'}));
        $("#title").formValidator({onShow:message_000,onFocus:message_000}).inputValidator({min:1,onError:"请输入标题"});
    });

</script>

<include file="public:footer" />
